package com.bangdream.michelia.sql.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.bangdream.michelia.entity.DownLoadInfo;
import com.bangdream.michelia.entity.CoursesTypeBean;

import com.bangdream.michelia.sql.greendao.DownLoadInfoDao;
import com.bangdream.michelia.sql.greendao.CoursesTypeBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig downLoadInfoDaoConfig;
    private final DaoConfig coursesTypeBeanDaoConfig;

    private final DownLoadInfoDao downLoadInfoDao;
    private final CoursesTypeBeanDao coursesTypeBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
        downLoadInfoDaoConfig.initIdentityScope(type);

        coursesTypeBeanDaoConfig = daoConfigMap.get(CoursesTypeBeanDao.class).clone();
        coursesTypeBeanDaoConfig.initIdentityScope(type);

        downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
        coursesTypeBeanDao = new CoursesTypeBeanDao(coursesTypeBeanDaoConfig, this);

        registerDao(DownLoadInfo.class, downLoadInfoDao);
        registerDao(CoursesTypeBean.class, coursesTypeBeanDao);
    }
    
    public void clear() {
        downLoadInfoDaoConfig.clearIdentityScope();
        coursesTypeBeanDaoConfig.clearIdentityScope();
    }

    public DownLoadInfoDao getDownLoadInfoDao() {
        return downLoadInfoDao;
    }

    public CoursesTypeBeanDao getCoursesTypeBeanDao() {
        return coursesTypeBeanDao;
    }

}
